Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix symlink deletion with --wipe option #7055

Merged
merged 1 commit into from
Apr 29, 2020
Merged

Fix symlink deletion with --wipe option #7055

merged 1 commit into from
Apr 29, 2020

Conversation

pinchartl
Copy link
Contributor

When wiping a build tree with --wipe, every entry in the build directory
is removed with mesonlib.windows_proof_rmtree() for directories and
mesonlib.windows_proof_rm() for other files. Symlinks to directories are
considered directories, resulting in the former being called. This
causes an exception to be raised, as the implementation calls
shutil.rmtree(), which isn't allowed on symlinks.

Fix this by using mesonlib.windows_proof_rm() for symlinks.

Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com

When wiping a build tree with --wipe, every entry in the build directory
is removed with mesonlib.windows_proof_rmtree() for directories and
mesonlib.windows_proof_rm() for other files. Symlinks to directories are
considered directories, resulting in the former being called. This
causes an exception to be raised, as the implementation calls
shutil.rmtree(), which isn't allowed on symlinks.

Fix this by using mesonlib.windows_proof_rm() for symlinks.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants